import {Engine ,AirBags } from './dependencecies.js';
export class Car {
    brand;
    engine;
    airBags;
    constructor(brand,displacement,cylinder,count,delay) {
        this.brand = brand;
        this.engine = new Engine(displacement,cylinder);
        this.airBags = new AirBags(count,delay);

        console.log(`constructor ${brand} car with ${displacement} displacement`);
    }

    run() { 
        this.engine.start();
    }
    onaccident(){
        this.airBags.deploy('onaccident');
    }
}